package token

import "fmt"

type TokenType int

const (
	EOF = iota
	ILLEGAL

	INTEGER

	PLUS
	MINUS
	ASTERISK
	SLASH

	LPAREN
	RPAREN
)

type Token struct {
	Type    TokenType
	Literal string
}

func (t Token) String() string {

	name := ""
	switch t.Type {
	case EOF:
		name = "EOF"
	case ILLEGAL:
		name = "ILLEGAL"
	case INTEGER:
		name = "INTEGER"
	}
	return fmt.Sprintf("Token{Type: %v, Literal: %v}", name, t.Literal)
}
